<template>
  <view>
    <button type="primary" @click="findZx()">点我复制知晓老师微信号</button>
  </view>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    findZx() {
      uni.setClipboardData({
        data: 'zhixiaoyixue',
        success: function () {
          uni.showToast({
            title: '复制微信号成功',
            icon: 'success',
            duration: 2000
          });
        },
        fail: function () {
          console.log('复制失败');
          // 可以添加错误处理或用户友好的提示
        }
      });
    }
  }
}
</script>

<style lang="scss">

</style>
